home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / oath.lha / oath / test / README < prev    next >
Text File  |  1991-08-29  |  4KB  |  172 lines

  1. Test files for OATH, in order of complexity:
  2.  
  3. chars1.cc       -- tests character
  4. bi1.cc          -- tests bigInteger
  5. biadd.cc        -- adds two bigIntegers from command line
  6. bimul.cc        -- multiplies two bigIntegers from command line
  7. hs1.cc          -- tests hashSet
  8. cs1.cc          -- tests characterSet
  9. pdl1.cc         -- tests pdList
  10. dll1.cc         -- tests dlList
  11. ms1.cc          -- tests minString
  12. anycase.cc      -- tests matchAnyCase of minString
  13. toks1.cc        -- tests stringTable and stringToken
  14. stable.cc       -- tests retrieveal from stringTables
  15. gctest.cc       -- tests garbage collection
  16.  
  17. Files whose names end with "0" include all .cc's from OATH that are necessary.
  18. Thus, no linking is required.  All other files are compiled separately and
  19. linked with the .o's of the OATH library.
  20.  
  21.  
  22. Expected output:
  23.  
  24. [ninja:421] chars1
  25. ABCD
  26. == succeeded!
  27. is() succeeded!
  28. ! succeeded!
  29. ABCD
  30. == succeeded!
  31. is() succeeded!
  32. ! succeeded!
  33.  
  34.  
  35. [ninja:422] bi1
  36.    Z = 0
  37.    O = 1
  38.    A = -1234567890
  39.    B = -987654321
  40. A+=B = -2222222211
  41. A+=B = -3209876532
  42. A+=B = -4197530853
  43. A+=B = -5185185174
  44. A+=B = -6172839495
  45. A+=B = -7160493816
  46.  
  47.  
  48. [ninja:423] hs1
  49. Success 1
  50. Success 2
  51. Success 3
  52. Success 4
  53. Success 5
  54. Success 6
  55. Count should be 100000: 100000
  56. Time to process 100000*8 contains calls:
  57.         Real Time = 2997 ms
  58.          CPU Time = 2830 ms
  59.  
  60.  
  61. [ninja:424] cs1
  62. Success 1
  63. Success 2
  64. Success 3
  65. Success 4
  66. Success 5
  67. Count should be 100000: 100000
  68. Time to process 100000*8 contains calls:
  69.         Real Time = 1119 ms
  70.          CPU Time = 910 ms
  71.  
  72.  
  73. [ninja:425] pdl1
  74. ABCD
  75. is() succeeded!
  76. == succeeded!
  77. isEmpty() succeeded!
  78. contains() succeeded!
  79. There are 3 characters in L1: CBA
  80. The second character is B
  81. The first character removed is C
  82. There are 2 characters in L2: BA
  83.  
  84.  
  85. [ninja:426] dll1
  86. ABCD
  87. is() succeeded!
  88. == succeeded!
  89. isEmpty() succeeded!
  90. contains() succeeded!
  91. There are 3 characters in L1: ABC
  92. The second character is B
  93. The first character removed is A
  94. There are 2 characters in L2: BC
  95.  
  96.  
  97. [ninja:427] ms1
  98. tar     (2358)
  99. stare   (38973)
  100. First char is s
  101. Char after tar is e
  102. It can match 'sta', if you wish.
  103. It just matched nothing successfully.
  104. Sbuffer is 42 char's long.
  105. Success!  The buffers are the same!
  106.  
  107.  
  108. [ninja:428] anycase
  109. tolower() seems to work.
  110. Four tests:
  111.  1 -- range; now at R
  112.  2 -- Range; now at R
  113.  3 -- RANGE; now at r
  114.  4 -- rANGE; now at *
  115. End tests.
  116.  
  117.  
  118. [ninja:429] toks1
  119. tar     (2358)
  120. tar     (2358)
  121. star    (9718)
  122. stare   (38973)
  123. Star == Star2
  124. Star != Sstar
  125. Begin forming tokens:
  126. Ttar == Ttar2
  127. Table formed.
  128. Table has member Ttar.
  129. Atar  = tar
  130. Table has member Ttar2.
  131. Atar2 = tar
  132. Table has member Tstar.
  133. Astar = star
  134. Table has member Tstare.
  135. Astare= stare
  136.  
  137.  
  138. [ninja:430] stable
  139. sizeof(stringTableA) = 4
  140. sizeof(stringTableG) = 28
  141. sizeof(stNodeP)      = 12
  142.  
  143. Declaration hash(106585786) mod7(6) mod11(10)
  144. Definition  hash( 26695354) mod7(0) mod11(4)
  145. Initializer hash(114729958) mod7(0) mod11(2)
  146.  
  147. 1000000 retrievals from int I ------ 420 ms
  148. 1000000 retrievals from DeclValue -- 1220 ms
  149. 1000000 retrievals from ST7 -------- 10680 ms
  150. 1000000 retrievals from ST11 ------- 9400 ms
  151.  
  152.  
  153. [ninja:431] gctest
  154. Beginning test.  Press c-C to stop.
  155. 0 : constructing 100000 tokens.  Press c-C to stop.
  156. 2733 : constructed 100000 tokens.  Press c-C to stop.
  157. 5102 : constructing 100000 tokens.  Press c-C to stop.
  158. 6913 : constructed 100000 tokens.  Press c-C to stop.
  159. 9274 : constructing 100000 tokens.  Press c-C to stop.
  160. 11087 : constructed 100000 tokens.  Press c-C to stop.
  161. 13502 : constructing 100000 tokens.  Press c-C to stop.
  162. 15351 : constructed 100000 tokens.  Press c-C to stop.
  163. 17670 : constructing 100000 tokens.  Press c-C to stop.
  164. 19522 : constructed 100000 tokens.  Press c-C to stop.
  165. ^C
  166.  
  167. (You must press c-C to stop this program.  You can observe the
  168.  memory being consumed by this process via utility 'top'.
  169.  After the second iteration, the memory consumed should NOT
  170.  grow.  Also the times (left of the colon) should be relatively
  171.  uniform.
  172. )